<template>
  <div>
    <h1>自定义指令</h1>
    <hr />
    <input type="text" v-focus />
  </div>
</template>

<script setup lang="ts">
const vFocus = {
  mounted(el: HTMLElement) {
    el.focus();
  },
};
</script>

<style scoped></style>
